package com.evan.alip7.lock.entity;

import lombok.Data;

import java.util.concurrent.TimeUnit;

/**
 * @author huangzhongliang
 * @time 2023/09/09 17:25
 */
@Data
public class Phone {//资源类

    public static synchronized void sendEmail() {
        try {
            TimeUnit.SECONDS.sleep(3L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("-------sendEmail");
    }


    public synchronized void sendSMS() {
        System.out.println("-------sendSMS");
    }

    public void hello() {
        System.out.println("-------hello");
    }

}
